Skip to content

Commit

Permalink
Merge pull request #2 from hu5970/RRFS_GSL_post_merge_fix
Browse files Browse the repository at this point in the history
Fixed several bugs in the code.
  • Loading branch information
EricJames-NOAA committed Jul 16, 2021
2 parents 499c26e + 0443565 commit cd477a3
Show file tree
Hide file tree
Showing 3 changed files with 15 additions and 8 deletions.
18 changes: 11 additions & 7 deletions sorc/ncep_post.fd/MAPSSLP.f
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ SUBROUTINE MAPSSLP(TPRES)
real,dimension(im,2) :: sdummy
REAL,dimension(im,jm) :: GRID1, TH700
INTEGER NSMOOTH
integer l, j, i, k, ii, jj
integer l, j, i, k, ii, jj ,ll
real dxm
!-----------------------------------------------------------------------
!***
Expand All @@ -38,23 +38,27 @@ SUBROUTINE MAPSSLP(TPRES)
EXPo = ROG*LAPSES
EXPINV = 1./EXPo

ll=0
DO L=1,LSM

if( SPL(L) == 70000. ) ll=l
ENDDO
if(ll > 0) then
!$omp parallel do private(i,j)
DO J=JSTA,JEND
DO I=1,IM
if(SPL(L) == 70000. .and. TPRES(I,J,L) <spval)THEN
T700(i,j) = TPRES(I,J,L)
if(TPRES(I,J,LL) < spval)THEN
T700(i,j) = TPRES(I,J,LL)
TH700(I,J) = T700(I,J)*(P1000/70000.)**CAPA
else
T700(i,j) = spval
TH700(I,J) = spval
endif
ENDDO
ENDDO

ENDDO

else
T700 = spval
TH700 = spval
endif

! smooth 700 mb temperature first
if(MAPTYPE==6) then
Expand Down
3 changes: 3 additions & 0 deletions sorc/ncep_post.fd/MDL2P.f
Original file line number Diff line number Diff line change
Expand Up @@ -146,6 +146,9 @@ SUBROUTINE MDL2P(iostatusD3D)
!
! START MDL2P.
!
TPRS=SPVAL
QPRS=SPVAL
FPRS=SPVAL
if (modelname == 'GFS') then
zero = 0.0
else
Expand Down
2 changes: 1 addition & 1 deletion sorc/ncep_post.fd/MDLFLD.f
Original file line number Diff line number Diff line change
Expand Up @@ -200,8 +200,8 @@ SUBROUTINE MDLFLD
ALLOCATE(PBLRI (IM,JSTA_2L:JEND_2U))
!
! SECOND, STANDARD NGM SEA LEVEL PRESSURE.
CALL NGMSLP ! this value is used in some later calculation.
IF (IGET(105) > 0) THEN
CALL NGMSLP
!$omp parallel do private(i,j)
DO J=JSTA,JEND
DO I=1,IM
Expand Down

0 comments on commit cd477a3

Please sign in to comment.