Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix Out of Bound Exception in GFSPOST.F #100

Merged
merged 2 commits into from
Feb 27, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions sorc/ncep_post.fd/GFSPOST.F
Original file line number Diff line number Diff line change
Expand Up @@ -419,7 +419,7 @@ subroutine tpause(km,p,u,v,t,h,ptp,utp,vtp,ttp,htp,shrtp)
integer klim(2),k,kd,ktp
! - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
! find tropopause level
call rsearch1(km-2,p(2),2,ptplim(1),klim(1))
call rsearch1(km-2,p(2),2,ptplim,klim)
klim(1)=klim(1)+1
klim(2)=klim(2)+2
! klim(1) > klim(2) or loops does not run ; klim(2) has a
Expand Down Expand Up @@ -519,7 +519,7 @@ subroutine mxwind(km,p,u,v,t,h,pmw,umw,vmw,tmw,hmw)
real spd(km),spdmw,wmw,dhd,dhu,shrd,shru,dhmw,ub,vb,spdb
! - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
! find maximum wind level
call rsearch1(km,p(1),2,pmwlim(1),klim(1))
call rsearch1(km,p(1),2,pmwlim,klim)
! klim(1)=klim(1)+1
klim(2)=klim(2)+1
! spd(klim(1):klim(2))=sqrt(u(klim(1):klim(2))**2+v(klim(1):klim(2))**2)
Expand Down
4 changes: 2 additions & 2 deletions sorc/ncep_post.fd/INITPOST_GFS_NETCDF.f
Original file line number Diff line number Diff line change
Expand Up @@ -135,7 +135,7 @@ SUBROUTINE INITPOST_GFS_NETCDF(ncid3d)
! DECLARE VARIABLES.
!
! REAL fhour
integer nfhour ! forecast hour from nems io file
! integer nfhour ! forecast hour from nems io file
integer fhzero !bucket
real dtp !physics time step
REAL RINC(5)
Expand Down Expand Up @@ -573,7 +573,7 @@ SUBROUTINE INITPOST_GFS_NETCDF(ncid3d)
deallocate(glat1d,glon1d)

print*,'idate = ',(idate(i),i=1,7)
print*,'nfhour = ',nfhour
! print*,'nfhour = ',nfhour

! sample print point
ii = im/2
Expand Down
2 changes: 1 addition & 1 deletion sorc/ncep_post.fd/INITPOST_NETCDF.f
Original file line number Diff line number Diff line change
Expand Up @@ -2795,7 +2795,7 @@ subroutine read_netcdf_3d_scatter(me,ncid,ifhr,im,jm,jsta,jsta_2l &
! iret = nf90_get_var(ncid,varid,dummy2,start=(/1,1,l,ifhr/), &
! count=(/im,jm,1,1/))
if (iret /= 0) then
print*,VarName,l," not found -Assigned missing values"
print*,VarName," not found -Assigned missing values"
do l=1,lm
do j=1,jm
do i=1,im
Expand Down