Skip to content

Commit cd477a3

Browse files
Merge pull request #2 from hu5970/RRFS_GSL_post_merge_fix
Fixed several bugs in the code.
2 parents 499c26e + 0443565 commit cd477a3

3 files changed

Lines changed: 15 additions & 8 deletions

File tree

sorc/ncep_post.fd/MAPSSLP.f

Lines changed: 11 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ SUBROUTINE MAPSSLP(TPRES)
2929
real,dimension(im,2) :: sdummy
3030
REAL,dimension(im,jm) :: GRID1, TH700
3131
INTEGER NSMOOTH
32-
integer l, j, i, k, ii, jj
32+
integer l, j, i, k, ii, jj ,ll
3333
real dxm
3434
!-----------------------------------------------------------------------
3535
!***
@@ -38,23 +38,27 @@ SUBROUTINE MAPSSLP(TPRES)
3838
EXPo = ROG*LAPSES
3939
EXPINV = 1./EXPo
4040

41+
ll=0
4142
DO L=1,LSM
42-
43+
if( SPL(L) == 70000. ) ll=l
44+
ENDDO
45+
if(ll > 0) then
4346
!$omp parallel do private(i,j)
4447
DO J=JSTA,JEND
4548
DO I=1,IM
46-
if(SPL(L) == 70000. .and. TPRES(I,J,L) <spval)THEN
47-
T700(i,j) = TPRES(I,J,L)
49+
if(TPRES(I,J,LL) < spval)THEN
50+
T700(i,j) = TPRES(I,J,LL)
4851
TH700(I,J) = T700(I,J)*(P1000/70000.)**CAPA
4952
else
5053
T700(i,j) = spval
5154
TH700(I,J) = spval
5255
endif
5356
ENDDO
5457
ENDDO
55-
56-
ENDDO
57-
58+
else
59+
T700 = spval
60+
TH700 = spval
61+
endif
5862

5963
! smooth 700 mb temperature first
6064
if(MAPTYPE==6) then

sorc/ncep_post.fd/MDL2P.f

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -146,6 +146,9 @@ SUBROUTINE MDL2P(iostatusD3D)
146146
!
147147
! START MDL2P.
148148
!
149+
TPRS=SPVAL
150+
QPRS=SPVAL
151+
FPRS=SPVAL
149152
if (modelname == 'GFS') then
150153
zero = 0.0
151154
else

sorc/ncep_post.fd/MDLFLD.f

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -200,8 +200,8 @@ SUBROUTINE MDLFLD
200200
ALLOCATE(PBLRI (IM,JSTA_2L:JEND_2U))
201201
!
202202
! SECOND, STANDARD NGM SEA LEVEL PRESSURE.
203+
CALL NGMSLP ! this value is used in some later calculation.
203204
IF (IGET(105) > 0) THEN
204-
CALL NGMSLP
205205
!$omp parallel do private(i,j)
206206
DO J=JSTA,JEND
207207
DO I=1,IM

0 commit comments

Comments
 (0)