Skip to content

Commit

Permalink
Drop off observations when the number of obs exceeds maxobs to avoid the
Browse files Browse the repository at this point in the history
out of bound/dimension issue in read_anowbufr.f90 read_dbz_nc.f90
read_gmi.f90 read_goesglm.f90 read_radar.f90 read_radar_wind_ascii.f90.
(From @YonghuiWeng-NOAA)
  • Loading branch information
BinLiu-NOAA committed Mar 27, 2023
1 parent 1178069 commit 296d324
Show file tree
Hide file tree
Showing 6 changed files with 7 additions and 0 deletions.
1 change: 1 addition & 0 deletions src/gsi/read_anowbufr.f90
Original file line number Diff line number Diff line change
Expand Up @@ -307,6 +307,7 @@ subroutine read_anowbufr(nread,ndata,nodata,gstime,&

ndata=ndata+1
nodata=nodata+1
if(ndata>maxobs) exit

cdata_all(iconc,ndata) = conc ! pm2_5 obs
cdata_all(ierror,ndata) = obserror ! pm2_5 obs error
Expand Down
1 change: 1 addition & 0 deletions src/gsi/read_dbz_nc.f90
Original file line number Diff line number Diff line change
Expand Up @@ -411,6 +411,7 @@ subroutine read_dbz_nc(nread,ndata,nodata,infile,lunout,obstype,sis,hgtl_full,no

!#################### Data thinning ###################
icntpnt=icntpnt+1
if(icntpnt>maxobs) exit

if(ithin > 0)then

Expand Down
1 change: 1 addition & 0 deletions src/gsi/read_gmi.f90
Original file line number Diff line number Diff line change
Expand Up @@ -528,6 +528,7 @@ subroutine read_gmi(mype,val_gmi,ithin,rmesh,jsatid,gstime,&
flgch = 0

iobs=iobs+1
if(iobs>maxobs) exit
end do read_loop
end do read_subset
690 continue
Expand Down
1 change: 1 addition & 0 deletions src/gsi/read_goesglm.f90
Original file line number Diff line number Diff line change
Expand Up @@ -276,6 +276,7 @@ subroutine read_goesglm(nread,ndata,nodata,infile,obstype,lunout,twindin,sis)
icntpnt=icntpnt+1

ndata=ndata+1
if(ndata>maxobs) exit
nodata=nodata+1
iout=ndata
isort(icntpnt)=iout
Expand Down
2 changes: 2 additions & 0 deletions src/gsi/read_radar.f90
Original file line number Diff line number Diff line change
Expand Up @@ -2911,6 +2911,7 @@ subroutine read_radar(nread,ndata,nodata,infile,lunout,obstype,twind,sis,hgtl_fu
!#################### Data thinning ###################

icntpnt=icntpnt+1
if(icntpnt>maxobs) exit

if(ithin > 0)then
if(zflag == 0)then
Expand Down Expand Up @@ -4031,6 +4032,7 @@ subroutine read_radar_l2rw(ndata,nodata,lunout,obstype,sis,nobs,hgtl_full)
end if
!#################### Data thinning ###################
icntpnt=icntpnt+1
if(icntpnt>maxobs) exit
ithin=1 !number of obs to keep per grid box
if(radar_no_thinning) then
ithin=-1
Expand Down
1 change: 1 addition & 0 deletions src/gsi/read_radar_wind_ascii.f90
Original file line number Diff line number Diff line change
Expand Up @@ -509,6 +509,7 @@ subroutine read_radar_wind_ascii(nread,ndata,nodata,infile,lunout,obstype,sis,hg
!#################### Data thinning ###################

icntpnt=icntpnt+1
if(icntpnt>maxobs) exit

if(ithin > 0)then
if(zflag == 0)then
Expand Down

0 comments on commit 296d324

Please sign in to comment.