Skip to content

Commit e227247

Browse files
authored
Bug fix in tcdc on isobaric levels (#540)
* Restrict undefined points involved in rounding cloud faction uppper and lower bounds * tweaking changes * add a change for underground points * Remove comment line
1 parent 4983789 commit e227247

File tree

1 file changed

+6
-4
lines changed

1 file changed

+6
-4
lines changed

sorc/ncep_post.fd/MDL2P.f

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,7 @@
3030
!> 2021-03-11 | B Cui | Change local arrays to dimension (im,jsta:jend)
3131
!> 2021-04-01 | J Meng | Computation on defined points only
3232
!> 2021-07-07 | J MENG | 2D DECOMPOSITION
33+
!> 2022-08-03 | W Meng | Modify total cloud fraction(331)
3334
!>
3435
!> @author T Black W/NP2 @date 1999-09-23
3536
SUBROUTINE MDL2P(iostatusD3D)
@@ -718,7 +719,7 @@ SUBROUTINE MDL2P(iostatusD3D)
718719
FRIME(I,J) = 1.
719720
RAD(I,J) = 0.
720721
O3SL(I,J) = O3(I,J,LLMH)
721-
CFRSL(I,J) = 0.
722+
IF(CFR(I,J,1)<SPVAL)CFRSL(I,J) = 0.
722723
END IF
723724
! Compute heights by interpolating from heights on interface for NAM but
724725
! hydrostaticJ integration for GFS
@@ -1316,9 +1317,10 @@ SUBROUTINE MDL2P(iostatusD3D)
13161317
DO J=JSTA,JEND
13171318
DO I=ISTA,IEND
13181319
GRID1(I,J) = SPVAL
1319-
CFRSL(I,J) = MIN(MAX(0.0,CFRSL(I,J)),1.0)
1320-
IF(abs(CFRSL(I,J)-SPVAL) > SMALL) &
1321-
GRID1(I,J) = CFRSL(I,J)*H100
1320+
IF(abs(CFRSL(I,J)-SPVAL) > SMALL) THEN
1321+
CFRSL(I,J) = MIN(MAX(0.0,CFRSL(I,J)),1.0)
1322+
GRID1(I,J) = CFRSL(I,J)*H100
1323+
ENDIF
13221324
ENDDO
13231325
ENDDO
13241326
if(grib == 'grib2')then

0 commit comments

Comments
 (0)