From 790d045bded3da870ec4d8b89299be2f84a9458f Mon Sep 17 00:00:00 2001 From: eric james Date: Tue, 12 Mar 2024 22:19:55 +0000 Subject: [PATCH 1/9] Updating CLDRAD and INITPOST_NETCDF --- sorc/ncep_post.fd/CLDRAD.f | 2 +- sorc/ncep_post.fd/INITPOST_NETCDF.f | 9 +++++++-- 2 files changed, 8 insertions(+), 3 deletions(-) diff --git a/sorc/ncep_post.fd/CLDRAD.f b/sorc/ncep_post.fd/CLDRAD.f index 4974ffc30..6dbf12dff 100644 --- a/sorc/ncep_post.fd/CLDRAD.f +++ b/sorc/ncep_post.fd/CLDRAD.f @@ -1764,7 +1764,7 @@ SUBROUTINE CLDRAD CLDP(I,J) = SPVAL CLDZ(I,J) = SPVAL ELSE IF (IBOT <= NINT(LMH(I,J))) THEN - CLDP(I,J) = PMID(I,J,IBOT) + CLDP(I,J) = PMID(I,J,IBOT) IF (IBOT == LM) THEN CLDZ(I,J) = ZINT(I,J,LM) ELSE diff --git a/sorc/ncep_post.fd/INITPOST_NETCDF.f b/sorc/ncep_post.fd/INITPOST_NETCDF.f index f3e73683c..6bb281f72 100644 --- a/sorc/ncep_post.fd/INITPOST_NETCDF.f +++ b/sorc/ncep_post.fd/INITPOST_NETCDF.f @@ -76,8 +76,8 @@ SUBROUTINE INITPOST_NETCDF(ncid2d,ncid3d) use vrbls2d, only: f, pd, fis, pblh, ustar, z0, ths, qs, twbs, qwbs, avgcprate, & cprate, avgprec, prec, lspa, sno, sndepac, si, cldefi, th10, q10, tshltr, pshltr, & - tshltr, albase, avgalbedo, avgtcdc, czen, czmean, mxsnal, landfrac, radot, sigt4, & - cfrach, cfracl, cfracm, avgcfrach, qshltr, avgcfracl, avgcfracm, cnvcfr, & + tshltr, albase, albedo, avgalbedo, avgtcdc, czen, czmean, mxsnal, landfrac, radot,& + sigt4,cfrach, cfracl, cfracm, avgcfrach, qshltr, avgcfracl, avgcfracm, cnvcfr, & islope, cmc, grnflx, vegfrc, acfrcv, ncfrcv, acfrst, ncfrst, ssroff, & bgroff, rlwin, rlwtoa, cldwork, alwin, alwout, alwtoa, rswin, rswinc, & rswout, aswin, auvbin, auvbinc, aswout, aswtoa, sfcshx, sfclhx, subshx, & @@ -1794,6 +1794,11 @@ SUBROUTINE INITPOST_NETCDF(ncid2d,ncid3d) enddo enddo if(debugprint)print*,'sample ',VarName,' = ',avgalbedo(isa,jsa) +! sfc albedo + VarName='sfalb' + call read_netcdf_2d_para(ncid2d,ista,ista_2l,iend,iend_2u,jsta,jsta_2l,jend,jend_2u, & + spval,VarName,albedo) + if(debugprint)print*,'sample ',VarName,' = ',albedo(isa,jsa) ! surface potential T using getgb VarName='tmpsfc' From 7852875421fc704be50a9da5ec0a0f0944e1acb5 Mon Sep 17 00:00:00 2001 From: eric james Date: Tue, 12 Mar 2024 22:21:57 +0000 Subject: [PATCH 2/9] Reverting change in CLDRAD.f --- sorc/ncep_post.fd/CLDRAD.f | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sorc/ncep_post.fd/CLDRAD.f b/sorc/ncep_post.fd/CLDRAD.f index 6dbf12dff..4974ffc30 100644 --- a/sorc/ncep_post.fd/CLDRAD.f +++ b/sorc/ncep_post.fd/CLDRAD.f @@ -1764,7 +1764,7 @@ SUBROUTINE CLDRAD CLDP(I,J) = SPVAL CLDZ(I,J) = SPVAL ELSE IF (IBOT <= NINT(LMH(I,J))) THEN - CLDP(I,J) = PMID(I,J,IBOT) + CLDP(I,J) = PMID(I,J,IBOT) IF (IBOT == LM) THEN CLDZ(I,J) = ZINT(I,J,LM) ELSE From 2e8f4dba18917c31f9181cdc8205ff60c7b1bc6e Mon Sep 17 00:00:00 2001 From: eric james Date: Mon, 25 Mar 2024 21:10:33 +0000 Subject: [PATCH 3/9] Changes to output CISOILM and SNOM. --- parm/fv3lam_rrfs.xml | 14 +++++--- parm/post_avblflds.xml | 9 +++++ parm/postxconfig-NT-fv3lam_rrfs.txt | 51 +++++++++++++++++++++++++---- sorc/ncep_post.fd/INITPOST_NETCDF.f | 28 +++++++++++++--- sorc/ncep_post.fd/SURFCE.f | 26 +++++++++++++++ 5 files changed, 112 insertions(+), 16 deletions(-) diff --git a/parm/fv3lam_rrfs.xml b/parm/fv3lam_rrfs.xml index 9e24122c3..6a35f46b9 100755 --- a/parm/fv3lam_rrfs.xml +++ b/parm/fv3lam_rrfs.xml @@ -399,8 +399,8 @@ - SOILM_ON_DEPTH_BEL_LAND_SFC - SOILMOI + CISOILM_ON_DEPTH_BEL_LAND_SFC + CISOILM 3.0 @@ -2411,8 +2411,8 @@ - SOILM_ON_DEPTH_BEL_LAND_SFC - SOILMOI + CISOILM_ON_DEPTH_BEL_LAND_SFC + CISOILM 3.0 @@ -2544,6 +2544,12 @@ 4.0 + + ACM_SNOM_ON_SURFACE + SNOM + 4.0 + + GSD_INST_CRAIN_ON_SURFACE CRAIN diff --git a/parm/post_avblflds.xml b/parm/post_avblflds.xml index 6663dad6a..184f32982 100755 --- a/parm/post_avblflds.xml +++ b/parm/post_avblflds.xml @@ -6599,6 +6599,15 @@ 9.0 + + 713 + CISOILM_ON_DEPTH_BEL_LAND_SFC + CISOILM + depth_bel_land_sfc + depth_bel_land_sfc + 3.0 + + 719 INST_USWRF_ON_TOP_OF_ATMOS diff --git a/parm/postxconfig-NT-fv3lam_rrfs.txt b/parm/postxconfig-NT-fv3lam_rrfs.txt index 47a032985..de1a59caf 100644 --- a/parm/postxconfig-NT-fv3lam_rrfs.txt +++ b/parm/postxconfig-NT-fv3lam_rrfs.txt @@ -1,7 +1,7 @@ 4 4 3 -253 +254 311 PRSLEV 32769 @@ -1980,12 +1980,12 @@ surface ? ? ? -36 -SOILM_ON_DEPTH_BEL_LAND_SFC +713 +CISOILM_ON_DEPTH_BEL_LAND_SFC ? 1 tmpl4_0 -SOILMOI +CISOILM ? ? depth_bel_land_sfc @@ -13503,12 +13503,12 @@ spec_hgt_lvl_above_grnd ? ? ? -36 -SOILM_ON_DEPTH_BEL_LAND_SFC +713 +CISOILM_ON_DEPTH_BEL_LAND_SFC ? 1 tmpl4_0 -SOILMOI +CISOILM ? ? depth_bel_land_sfc @@ -14243,6 +14243,43 @@ surface ? ? ? +121 +ACM_SNOM_ON_SURFACE +? +1 +tmpl4_8 +SNOM +? +ACM +surface +0 +? +0 +? +? +0 +? +0 +? +? +? +0 +0.0 +0 +0.0 +? +0 +0.0 +0 +0.0 +1 +4.0 +0 +0 +0 +? +? +? 407 GSD_INST_CRAIN_ON_SURFACE GSD_instant precipitation type on surface diff --git a/sorc/ncep_post.fd/INITPOST_NETCDF.f b/sorc/ncep_post.fd/INITPOST_NETCDF.f index 6bb281f72..5183131a5 100644 --- a/sorc/ncep_post.fd/INITPOST_NETCDF.f +++ b/sorc/ncep_post.fd/INITPOST_NETCDF.f @@ -3095,13 +3095,31 @@ SUBROUTINE INITPOST_NETCDF(ncid2d,ncid3d) endif enddo enddo + VarName='snom_land' + call read_netcdf_2d_para(ncid2d,ista,ista_2l,iend,iend_2u,jsta,jsta_2l,jend,jend_2u, & + spval,VarName,buf) + VarName='snom_ice' + call read_netcdf_2d_para(ncid2d,ista,ista_2l,iend,iend_2u,jsta,jsta_2l,jend,jend_2u, & + spval,VarName,buf2) +!$omp parallel do private(i,j) + do j = jsta_2l, jend_2u + do i=ista,iend + if(buf(i,j)0) THEN +!$omp parallel do private(i,j) + DO J=JSTA,JEND + DO I=ISTA,IEND +! IF(SMSTOT(I,J)/=SPVAL) THEN + GRID1(I,J) = SMSTOT(I,J) +! ELSE +! GRID1(I,J) = SPVAL +! ENDIF + ENDDO + ENDDO + if(grib=='grib2') then + cfld=cfld+1 + fld_info(cfld)%ifld=IAVBLFLD(IGET(713)) +!$omp parallel do private(i,j,ii,jj) + do j=1,jend-jsta+1 + jj = jsta+j-1 + do i=1,iend-ista+1 + ii = ista+i-1 + datapd(i,j,cfld) = GRID1(ii,jj) + enddo + enddo + endif + ENDIF +! ! PLANT CANOPY SURFACE WATER. IF ( IGET(118)>0 ) THEN IF(MODELNAME == 'RAPR') THEN From 1fa20ae6e31c3ba2a4648120c5f29ab6e9ad2a17 Mon Sep 17 00:00:00 2001 From: eric james Date: Mon, 25 Mar 2024 21:13:14 +0000 Subject: [PATCH 4/9] Cleaning up syntax. --- sorc/ncep_post.fd/INITPOST_NETCDF.f | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/sorc/ncep_post.fd/INITPOST_NETCDF.f b/sorc/ncep_post.fd/INITPOST_NETCDF.f index 5183131a5..f8bac2549 100644 --- a/sorc/ncep_post.fd/INITPOST_NETCDF.f +++ b/sorc/ncep_post.fd/INITPOST_NETCDF.f @@ -3552,9 +3552,9 @@ SUBROUTINE INITPOST_NETCDF(ncid2d,ncid3d) spval,VarName,smstot) ! mask water areas !$omp parallel do private(i,j) - do j=jsta,jend - do i=ista,iend - if (sm(i,j) /= 0.0) smstot(i,j) = spval + do j=jsta,jend + do i=ista,iend + if (sm(i,j) /= 0.0) smstot(i,j) = spval enddo enddo From 8cadfc00b6dc015a9611a3563d4a589e17cebe70 Mon Sep 17 00:00:00 2001 From: eric james Date: Mon, 25 Mar 2024 21:16:21 +0000 Subject: [PATCH 5/9] Adding change logs. --- sorc/ncep_post.fd/INITPOST_NETCDF.f | 5 +++-- sorc/ncep_post.fd/SURFCE.f | 1 + 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/sorc/ncep_post.fd/INITPOST_NETCDF.f b/sorc/ncep_post.fd/INITPOST_NETCDF.f index f8bac2549..f4206bbca 100644 --- a/sorc/ncep_post.fd/INITPOST_NETCDF.f +++ b/sorc/ncep_post.fd/INITPOST_NETCDF.f @@ -48,6 +48,7 @@ !> 2024-01-12 | Wen Meng | Remove the hard-wired bucket for beyond F240 !> 2024-02-07 | Eric James | Adding reading of direct and diffuse irradiance and LAI !> 2024-02-20 | Jaymes Kenyon | Add calculation of PBLHGUST (from INITPOST.F) to support RRFS 10-m wind gust diagnostic +!> 2024-03-25 | Eric James | Enabling reading of snow melt and surface albedo from RRFS !> !> @author Hui-Ya Chuang @date 2016-03-04 !---------------------------------------------------------------------- @@ -3117,9 +3118,9 @@ SUBROUTINE INITPOST_NETCDF(ncid2d,ncid3d) do j=jsta_2l,jend_2u do i=ista_2l,iend_2u ! smstav(i,j) = spval ! GFS does not have soil moisture availability - smstot(i,j) = spval ! GFS does not have total soil moisture +! smstot(i,j) = spval ! GFS does not have total soil moisture sfcevp(i,j) = spval ! GFS does not have accumulated surface evaporation -! acsnom(i,j) = spval ! GFS does not have snow melt + acsnom(i,j) = spval ! GFS does not have snow melt ! sst(i,j) = spval ! GFS does not have sst???? thz0(i,j) = ths(i,j) ! GFS does not have THZ0, use THS to substitute qz0(i,j) = spval ! GFS does not output humidity at roughness length diff --git a/sorc/ncep_post.fd/SURFCE.f b/sorc/ncep_post.fd/SURFCE.f index 23c9c0f8b..85a099a3c 100644 --- a/sorc/ncep_post.fd/SURFCE.f +++ b/sorc/ncep_post.fd/SURFCE.f @@ -48,6 +48,7 @@ !> 2024-01-23 | E James | Using consistent snow ratio SR from history files throughout GSL precip type diagnosis. !> 2024-01-30 | A Jensen | Comment out graupel precipitation warning. !> 2024-02-07 | E James | Enabling output of LAI and wilting point for RRFS. +!> 2024-03-25 | E James | Enabling output of column integrated soil moisture. !> !> @note !> USAGE: CALL SURFCE From 669cb6b77f2aafd62ffe3a5f089deda68089dfbe Mon Sep 17 00:00:00 2001 From: eric james Date: Mon, 25 Mar 2024 22:31:24 +0000 Subject: [PATCH 6/9] Small updates. --- sorc/ncep_post.fd/CALVIS_GSD.f | 2 +- sorc/ncep_post.fd/INITPOST_NETCDF.f | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/sorc/ncep_post.fd/CALVIS_GSD.f b/sorc/ncep_post.fd/CALVIS_GSD.f index c2795a6e5..77b5a836d 100644 --- a/sorc/ncep_post.fd/CALVIS_GSD.f +++ b/sorc/ncep_post.fd/CALVIS_GSD.f @@ -360,7 +360,7 @@ SUBROUTINE CALVIS_GSD(CZEN,VIS) endif ! Calculation of visibility based on hydrometeor and aerosols. (RH effect not yet included.) - VIS(I,J)=MIN(90.,CONST1/(BETAV+extcof55(i,j,lm))) ! max of 90km + VIS(I,J)=MIN(90.,CONST1/BETAV) ! max of 90km if (vis(i,j) Date: Thu, 28 Mar 2024 17:03:33 +0000 Subject: [PATCH 7/9] Removing extcof55 from visibility calculation (it's all zeroes). --- sorc/ncep_post.fd/CALVIS_GSD.f | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/sorc/ncep_post.fd/CALVIS_GSD.f b/sorc/ncep_post.fd/CALVIS_GSD.f index 77b5a836d..2f0c005a6 100644 --- a/sorc/ncep_post.fd/CALVIS_GSD.f +++ b/sorc/ncep_post.fd/CALVIS_GSD.f @@ -92,12 +92,14 @@ SUBROUTINE CALVIS_GSD(CZEN,VIS) ! 2021-08 Wen Meng - Restrict divided by 0. ! 2021-10 Jesse Meng - 2D DECOMPOSITION ! 2023-11 Tim Corrie, Eric James - addition of attenuation for blowing snow +! 2024-03 Eric James - removal of extcof55 factor in visibility +! calculation (extcof55 is all zeroes) ! !------------------------------------------------------------------ ! use vrbls2d, only: sno, si, ustar - use vrbls3d, only: qqw, qqi, qqs, qqr, qqg, t, pmid, q, u, v, extcof55, aextc55 + use vrbls3d, only: qqw, qqi, qqs, qqr, qqg, t, pmid, q, u, v, aextc55 use params_mod, only: h1, d608, rd, g use ctlblk_mod, only: jm, im, jsta_2l, jend_2u, lm, modelname, spval, method_blsn,& ista_2l, iend_2u From e9df1733f746943beda05500713dbdf9e645d8ee Mon Sep 17 00:00:00 2001 From: eric james Date: Mon, 1 Apr 2024 17:32:34 +0000 Subject: [PATCH 8/9] Reverting change in INITPOST_NETCDF.f setting smstot to spval --- sorc/ncep_post.fd/INITPOST_NETCDF.f | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sorc/ncep_post.fd/INITPOST_NETCDF.f b/sorc/ncep_post.fd/INITPOST_NETCDF.f index 127e03bd7..8537de90e 100644 --- a/sorc/ncep_post.fd/INITPOST_NETCDF.f +++ b/sorc/ncep_post.fd/INITPOST_NETCDF.f @@ -3134,7 +3134,7 @@ SUBROUTINE INITPOST_NETCDF(ncid2d,ncid3d) do j=jsta_2l,jend_2u do i=ista_2l,iend_2u ! smstav(i,j) = spval ! GFS does not have soil moisture availability - smstot(i,j) = spval ! GFS does not have total soil moisture +! smstot(i,j) = spval ! GFS does not have total soil moisture sfcevp(i,j) = spval ! GFS does not have accumulated surface evaporation ! acsnom(i,j) = spval ! GFS does not have snow melt ! sst(i,j) = spval ! GFS does not have sst???? From 935ab00c31f05097666f28bbd930201832d9c481 Mon Sep 17 00:00:00 2001 From: eric james Date: Mon, 1 Apr 2024 18:32:31 +0000 Subject: [PATCH 9/9] Using a single level "0 m underground" for CISOILM --- parm/post_avblflds.xml | 1 - parm/postxconfig-NT-fv3lam_rrfs.txt | 4 ++-- 2 files changed, 2 insertions(+), 3 deletions(-) diff --git a/parm/post_avblflds.xml b/parm/post_avblflds.xml index 184f32982..79f8c7da9 100755 --- a/parm/post_avblflds.xml +++ b/parm/post_avblflds.xml @@ -6604,7 +6604,6 @@ CISOILM_ON_DEPTH_BEL_LAND_SFC CISOILM depth_bel_land_sfc - depth_bel_land_sfc 3.0 diff --git a/parm/postxconfig-NT-fv3lam_rrfs.txt b/parm/postxconfig-NT-fv3lam_rrfs.txt index 7a964d1fb..859920068 100644 --- a/parm/postxconfig-NT-fv3lam_rrfs.txt +++ b/parm/postxconfig-NT-fv3lam_rrfs.txt @@ -1993,7 +1993,7 @@ depth_bel_land_sfc ? 0 ? -depth_bel_land_sfc +? 0 ? 0 @@ -13516,7 +13516,7 @@ depth_bel_land_sfc ? 0 ? -depth_bel_land_sfc +? 0 ? 0