Skip to content

Commit e861999

Browse files
committed
Further fix bugs to ensure obs other than KUAS do not be affected
1 parent c83c3d9 commit e861999

File tree

1 file changed

+12
-4
lines changed

1 file changed

+12
-4
lines changed

src/gsi/read_fl_hdob.f90

Lines changed: 12 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -306,6 +306,7 @@ subroutine read_fl_hdob(nread,ndata,nodata,infile,obstype,lunout,gstime,twind,si
306306
! If found, get the index (nc) from the convinfo for the specified type
307307
ntmatch = 0
308308
ncsave = 0
309+
nctemp = 0
309310
do nc = 1, nconvtype
310311
if (trim(ioctype(nc)) == trim(obstype))then
311312
if (trim(ioctype(nc)) == 'uv' .and. ictype(nc) == 236 .or. &
@@ -332,8 +333,9 @@ subroutine read_fl_hdob(nread,ndata,nodata,infile,obstype,lunout,gstime,twind,si
332333
return
333334
else
334335
nc = ncsave
335-
write(6,*) ' READ_FL_HDOB: Processing FL HDOB data : ', ntmatch, nc, ioctype(nc), ictype(nc), ictype(nc)
336+
write(6,*) ' READ_FL_HDOB: Processing FL HDOB data : ', ntmatch, nc, ioctype(nc), ictype(nc), itype
336337
end if
338+
if (nctemp.ne.0) write(6,*) ' READ_FL_HDOB: Processing FL HDOB KUAS : ', nctemp, ioctype(nctemp), ictype(nctemp)
337339

338340
ncount_ps=0;ncount_q=0;ncount_t=0;ncount_uv=0
339341
! Setup thinning parameters
@@ -481,10 +483,18 @@ subroutine read_fl_hdob(nread,ndata,nodata,infile,obstype,lunout,gstime,twind,si
481483
! 3 both lat/lon abd GA/PS questionable
482484

483485
call ufbint(lunin,obsqcm,2,1,nlv,qcmstr)
486+
nc=ncsave
487+
itype=ictype(nc)
488+
ithin=ithin_conv(nc)
484489
if (trim(obsbul(2,1)) == 'KUAS') then
485490
obsqcm(1,1)=64 !Temp Fix for KUAS
486491
obsqcm(2,1)=64 !Temp Fix for KUAS
487-
nc=nctemp ! XL get-around for KUAS
492+
if (nctemp == 0) then
493+
print *,"Warning, KUAS needs 138/238, not found in convinfo, use 136/236 instead"
494+
nc=ncsave
495+
else
496+
nc=nctemp ! XL get-around for KUAS
497+
endif
488498
itype=ictype(nc)
489499
ithin=ithin_conv(nc) !Updating thinning from 138/238
490500
if (ithin > 0) then
@@ -508,8 +518,6 @@ subroutine read_fl_hdob(nread,ndata,nodata,infile,obstype,lunout,gstime,twind,si
508518
enddo
509519
endif
510520
endif
511-
write(6,*)'READ_FL_HDOB KUAS: ictype(nc),rmesh,pflag,nlevp,pmesh,nc ',&
512-
ioctype(nc),ictype(nc),rmesh,pflag,nlevp,pmesh,nc
513521
endif
514522
end if
515523
call upftbv(lunin,"QHDOP",obsqcm(1,1),mxib,ibit,nib)

0 commit comments

Comments
 (0)