From e22724738fd104327fee7c3c7ffc805ccabd619f Mon Sep 17 00:00:00 2001 From: WenMeng-NOAA <48260754+WenMeng-NOAA@users.noreply.github.com> Date: Thu, 4 Aug 2022 13:20:15 -0400 Subject: [PATCH] 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 --- sorc/ncep_post.fd/MDL2P.f | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/sorc/ncep_post.fd/MDL2P.f b/sorc/ncep_post.fd/MDL2P.f index ccb2b5c43..ce3269951 100644 --- a/sorc/ncep_post.fd/MDL2P.f +++ b/sorc/ncep_post.fd/MDL2P.f @@ -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) @@ -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) 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