Skip to content

Commit

Permalink
Bug fix in tcdc on isobaric levels (#540)
Browse files Browse the repository at this point in the history
* Restrict undefined points involved in rounding cloud faction uppper and lower bounds

* tweaking changes

* add a change for underground points

* Remove comment line
  • Loading branch information
WenMeng-NOAA authored Aug 4, 2022
1 parent 4983789 commit e227247
Showing 1 changed file with 6 additions and 4 deletions.
10 changes: 6 additions & 4 deletions sorc/ncep_post.fd/MDL2P.f
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,7 @@
!> 2021-03-11 | B Cui | Change local arrays to dimension (im,jsta:jend)
!> 2021-04-01 | J Meng | Computation on defined points only
!> 2021-07-07 | J MENG | 2D DECOMPOSITION
!> 2022-08-03 | W Meng | Modify total cloud fraction(331)
!>
!> @author T Black W/NP2 @date 1999-09-23
SUBROUTINE MDL2P(iostatusD3D)
Expand Down Expand Up @@ -718,7 +719,7 @@ SUBROUTINE MDL2P(iostatusD3D)
FRIME(I,J) = 1.
RAD(I,J) = 0.
O3SL(I,J) = O3(I,J,LLMH)
CFRSL(I,J) = 0.
IF(CFR(I,J,1)<SPVAL)CFRSL(I,J) = 0.
END IF
! Compute heights by interpolating from heights on interface for NAM but
! hydrostaticJ integration for GFS
Expand Down Expand Up @@ -1316,9 +1317,10 @@ SUBROUTINE MDL2P(iostatusD3D)
DO J=JSTA,JEND
DO I=ISTA,IEND
GRID1(I,J) = SPVAL
CFRSL(I,J) = MIN(MAX(0.0,CFRSL(I,J)),1.0)
IF(abs(CFRSL(I,J)-SPVAL) > SMALL) &
GRID1(I,J) = CFRSL(I,J)*H100
IF(abs(CFRSL(I,J)-SPVAL) > SMALL) THEN
CFRSL(I,J) = MIN(MAX(0.0,CFRSL(I,J)),1.0)
GRID1(I,J) = CFRSL(I,J)*H100
ENDIF
ENDDO
ENDDO
if(grib == 'grib2')then
Expand Down

0 comments on commit e227247

Please sign in to comment.