Skip to content

Commit

Permalink
nread bug in read_radar.f90 (#738)
Browse files Browse the repository at this point in the history
In read_radar.f90, the value of nread should be "nsuper2_kept" and
shouldn't be reset to zero after processing TDR data.

- [x] Bug fix (non-breaking change which fixes an issue)
  • Loading branch information
ShunLiu-NOAA committed Apr 30, 2024
1 parent 8a85d7c commit a3a2633
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/gsi/read_radar.f90
Original file line number Diff line number Diff line change
Expand Up @@ -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'
Expand Down Expand Up @@ -2176,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
Expand Down Expand Up @@ -2522,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
Expand Down

0 comments on commit a3a2633

Please sign in to comment.