From 19e8bec4fe192e1f90ed3d4ed5af8afca7105beb Mon Sep 17 00:00:00 2001 From: Shun Liu Date: Wed, 24 Apr 2024 12:12:08 +0000 Subject: [PATCH 1/2] The value of nread should be nsuper2_kept and shouldn't be reset to zero after processing TDR data --- src/gsi/read_radar.f90 | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/gsi/read_radar.f90 b/src/gsi/read_radar.f90 index a824bbbe4..40a9d495e 100644 --- a/src/gsi/read_radar.f90 +++ b/src/gsi/read_radar.f90 @@ -907,6 +907,7 @@ subroutine read_radar(nread,ndata,nodata,infile,lunout,obstype,twind,sis,hgtl_fu end do superobs close(lnbufr) ! A simple unformatted fortran file should not be mixed with a bufr I/O + nread=nsuper2_kept LEVEL_TWO_READ_2: if(loop==0 .and. sis=='l2rw') then write(6,*)'READ_RADAR: ',trim(outmessage),' reached eof on 2/2.5/3 superob radar file' @@ -2151,6 +2152,7 @@ subroutine read_radar(nread,ndata,nodata,infile,lunout,obstype,twind,sis,hgtl_fu end if + if (trim(infile) == 'tldplrbufr' .and. trim(infile) == 'tldplrso') then erad = rearth thiserr=5.0_r_kind @@ -2190,6 +2192,7 @@ subroutine read_radar(nread,ndata,nodata,infile,lunout,obstype,twind,sis,hgtl_fu naftswp=0 nfore=0 naft=0 + end if xscale=100._r_kind xscalei=one/xscale From a4023841072418fbfc6ca8c6bb7daaa7d16bbbb1 Mon Sep 17 00:00:00 2001 From: Shun Liu Date: Fri, 26 Apr 2024 03:05:03 +0000 Subject: [PATCH 2/2] remove if-condition since nread is total number of radar wind from the different observation type. --- src/gsi/read_radar.f90 | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/src/gsi/read_radar.f90 b/src/gsi/read_radar.f90 index 40a9d495e..84a4f4fbc 100644 --- a/src/gsi/read_radar.f90 +++ b/src/gsi/read_radar.f90 @@ -2152,7 +2152,6 @@ subroutine read_radar(nread,ndata,nodata,infile,lunout,obstype,twind,sis,hgtl_fu end if - if (trim(infile) == 'tldplrbufr' .and. trim(infile) == 'tldplrso') then erad = rearth thiserr=5.0_r_kind @@ -2178,7 +2177,6 @@ subroutine read_radar(nread,ndata,nodata,infile,lunout,obstype,twind,sis,hgtl_fu ibadstaheight=0 notgood=0 notgood0=0 - nread=0 ntdrvr_in=0 ntdrvr_kept=0 ntdrvr_thin1=0 @@ -2192,7 +2190,6 @@ subroutine read_radar(nread,ndata,nodata,infile,lunout,obstype,twind,sis,hgtl_fu naftswp=0 nfore=0 naft=0 - end if xscale=100._r_kind xscalei=one/xscale @@ -2525,7 +2522,7 @@ subroutine read_radar(nread,ndata,nodata,infile,lunout,obstype,twind,sis,hgtl_fu end do ! end of loop, reading TDR so data files close(lnbufr) - else + else if (trim(infile) == 'tldplrbufr' ) then nswptype=0 nmrecs=0