Skip to content

Commit

Permalink
Update to bufr/11.7.0, add safeguard to avoid out of bounds reference…
Browse files Browse the repository at this point in the history
… in read_prepbufr.f90 (NOAA-EMC#474)
  • Loading branch information
RussTreadon-NOAA committed Sep 6, 2022
1 parent 98184a0 commit 59ceb45
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 2 deletions.
2 changes: 1 addition & 1 deletion modulefiles/gsi_common.lua
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ Load common modules to build GSI on all machines

local netcdf_ver=os.getenv("netcdf_ver") or "4.7.4"

local bufr_ver=os.getenv("bufr_ver") or "11.5.0"
local bufr_ver=os.getenv("bufr_ver") or "11.7.0"
local bacio_ver=os.getenv("bacio_ver") or "2.4.1"
local w3emc_ver=os.getenv("w3emc_ver") or "2.9.1"
local sp_ver=os.getenv("sp_ver") or "2.3.3"
Expand Down
6 changes: 5 additions & 1 deletion src/gsi/read_prepbufr.f90
Original file line number Diff line number Diff line change
Expand Up @@ -3057,7 +3057,11 @@ subroutine read_prepbufr(nread,ndata,nodata,infile,obstype,lunout,twindin,sis,&

do k=1,ndata
ikx=nint(cdata_out(10,k))
itype=ictype(ikx)
if (ikx>0) then
itype=ictype(ikx)
else
itype=0
endif
if( itype ==230 .or. itype ==231 .or. itype ==233) then
prest=r10*exp(cdata_out(4,k))
if (prest <100.0_r_kind) cycle
Expand Down

0 comments on commit 59ceb45

Please sign in to comment.