From 2f496fc70ca830a61f74f15a7d40d8d0a82234d6 Mon Sep 17 00:00:00 2001 From: eric james Date: Tue, 21 Nov 2023 17:59:05 +0000 Subject: [PATCH 1/4] Introducing blowing snow effect on GSL visibility diagnostic. --- sorc/ncep_post.fd/CALVIS_GSD.f | 53 ++++++++++++++++++++++++++++++++-- tests/compile_upp.sh | 2 +- 2 files changed, 52 insertions(+), 3 deletions(-) diff --git a/sorc/ncep_post.fd/CALVIS_GSD.f b/sorc/ncep_post.fd/CALVIS_GSD.f index ca9028294..351997399 100644 --- a/sorc/ncep_post.fd/CALVIS_GSD.f +++ b/sorc/ncep_post.fd/CALVIS_GSD.f @@ -91,24 +91,30 @@ SUBROUTINE CALVIS_GSD(CZEN,VIS) ! 2021-05 Wen Meng - Add checking for undefined points invloved in computation ! 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 ! !------------------------------------------------------------------ ! + use vrbls2d, only: sno, si, ustar use vrbls3d, only: qqw, qqi, qqs, qqr, qqg, t, pmid, q, u, v, extcof55, aextc55 - use params_mod, only: h1, d608, rd + use params_mod, only: h1, d608, rd, g use ctlblk_mod, only: jm, im, jsta_2l, jend_2u, lm, modelname, spval,& ista_2l, iend_2u implicit none integer :: j, i, k, ll - integer :: method + integer :: method, method_blsn real :: tx, pol, esx, es, e REAL VIS(ista_2l:iend_2u,jsta_2l:jend_2u) REAL RHB(ista_2l:iend_2u,jsta_2l:jend_2u,LM) REAL CZEN(ista_2l:iend_2u,jsta_2l:jend_2u) + real :: z, ustar_t, u_p, lamda, r_bar, alpha + real :: rho_sno + real :: z_r, Q_s, C_r, c_z, c_alpha, vis_blsn, BETABLSN + real celkel,tice,coeflc,coeflp,coeffc,coeffp,coeffg real exponlc,exponlp,exponfc,exponfp,exponfg,const1 real rhoice,rhowat,qrain,qsnow,qgraupel,qclw,qclice,tv,rhoair, & @@ -136,6 +142,7 @@ SUBROUTINE CALVIS_GSD(CZEN,VIS) ! Aerosol method (2), ! Smoke added to RH method for clear air (3) ! 3 - option to add reducted visibility from smoke-based aerosols. + method_blsn = 1 ! 1 for 'on', 0 for 'off' CELKEL = 273.15 TICE = CELKEL-10. @@ -300,6 +307,45 @@ SUBROUTINE CALVIS_GSD(CZEN,VIS) if (t(i,j,lm)< 270. .and. temp_fac==1.) & write (6,*) 'Problem w/ temp_fac - calvis' +! Key calculation of attenuation from blowing snow -- updated 5 August 2022 by Tim Corrie +! Framework is from Letcher et al (2021) + + ustar_t = 0.2 + u_p = 2.8*ustar_t + lamda = 0.45 + z = 2.0 + alpha = 15.0 + r_bar = 0.0002 + +! print *, i,j + + + if (si(i,j) Date: Tue, 21 Nov 2023 18:00:25 +0000 Subject: [PATCH 2/4] Reverting change to compile_upp.sh --- tests/compile_upp.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/compile_upp.sh b/tests/compile_upp.sh index 3f073f3ef..078a63b8c 100755 --- a/tests/compile_upp.sh +++ b/tests/compile_upp.sh @@ -24,7 +24,7 @@ usage() { } prefix="../install" -ifi_opt=" -DBUILD_WITH_IFI=ON" +ifi_opt=" -DBUILD_WITH_IFI=OFF" gtg_opt=" -DBUILD_WITH_GTG=OFF" wrfio_opt=" -DBUILD_WITH_WRFIO=ON" compiler="intel" From dd34967397e63bbeeff8258d083bf9bd06fdd283 Mon Sep 17 00:00:00 2001 From: eric james Date: Fri, 24 Nov 2023 21:25:09 +0000 Subject: [PATCH 3/4] Changing "method_blsn" to a namelist option, set to "true" by default. --- sorc/ncep_post.fd/CALVIS_GSD.f | 7 +++---- sorc/ncep_post.fd/CTLBLK.f | 2 ++ sorc/ncep_post.fd/WRFPOST.f | 5 +++-- 3 files changed, 8 insertions(+), 6 deletions(-) diff --git a/sorc/ncep_post.fd/CALVIS_GSD.f b/sorc/ncep_post.fd/CALVIS_GSD.f index 351997399..c2795a6e5 100644 --- a/sorc/ncep_post.fd/CALVIS_GSD.f +++ b/sorc/ncep_post.fd/CALVIS_GSD.f @@ -99,13 +99,13 @@ SUBROUTINE CALVIS_GSD(CZEN,VIS) use vrbls2d, only: sno, si, ustar use vrbls3d, only: qqw, qqi, qqs, qqr, qqg, t, pmid, q, u, v, extcof55, aextc55 use params_mod, only: h1, d608, rd, g - use ctlblk_mod, only: jm, im, jsta_2l, jend_2u, lm, modelname, spval,& + use ctlblk_mod, only: jm, im, jsta_2l, jend_2u, lm, modelname, spval, method_blsn,& ista_2l, iend_2u implicit none integer :: j, i, k, ll - integer :: method, method_blsn + integer :: method real :: tx, pol, esx, es, e REAL VIS(ista_2l:iend_2u,jsta_2l:jend_2u) REAL RHB(ista_2l:iend_2u,jsta_2l:jend_2u,LM) @@ -142,7 +142,6 @@ SUBROUTINE CALVIS_GSD(CZEN,VIS) ! Aerosol method (2), ! Smoke added to RH method for clear air (3) ! 3 - option to add reducted visibility from smoke-based aerosols. - method_blsn = 1 ! 1 for 'on', 0 for 'off' CELKEL = 273.15 TICE = CELKEL-10. @@ -355,7 +354,7 @@ SUBROUTINE CALVIS_GSD(CZEN,VIS) ! Addition of attenuation from aerosols if option selected if(method == 2 .or. method == 3)then ! aerosol method BETAV = BETAV + aextc55(i,j,lm)*1000. - if(method_blsn .eq. 1) then ! BLSN method, updated 8 August 2022 by Tim Corrie + if(method_blsn) then ! BLSN method, updated 8 August 2022 by Tim Corrie BETAV = BETAV + BETABLSN endif endif diff --git a/sorc/ncep_post.fd/CTLBLK.f b/sorc/ncep_post.fd/CTLBLK.f index 224742918..663a6d6eb 100644 --- a/sorc/ncep_post.fd/CTLBLK.f +++ b/sorc/ncep_post.fd/CTLBLK.f @@ -18,6 +18,7 @@ !> 2023-04-04 | Li(Kate Zhang) | Add namelist optoin for CCPP-Chem (UFS-Chem) and 2D diag. output (d2d_chem) for GEFS-Aerosols and CCPP-Chem model. !> 2023-04-17 | Eric James | Adding 160 and 320 m above ground to HTFD for RRFS output. !> 2023-08-16 | Yali Mao | Add gtg_on logical option +!> 2023-11-24 | Eric James | Add method_blsn logical option !----------------------------------------------------------------------- !> @defgroup CTLBLK_mod Sets default parameters that are used throughout the UPP code !----------------------------------------------------------------------- @@ -73,6 +74,7 @@ module CTLBLK_mod logical :: aqf_on !< Turn on Air Quality Forecasting (CMAQ-based). logical :: slrutah_on !< Calculate snow to liquid ratio (SLR) using method from University of Utah. logical :: gtg_on !< Turn on GTG (Graphical Turbulence Guidance) + logical :: method_blsn !< Turn on blowing snow effect on visibility diagnostic ! logical :: SIGMA !< No longer used/supported. logical :: RUN !< No longer used/supported. diff --git a/sorc/ncep_post.fd/WRFPOST.f b/sorc/ncep_post.fd/WRFPOST.f index d2b0ef546..30ca7af17 100644 --- a/sorc/ncep_post.fd/WRFPOST.f +++ b/sorc/ncep_post.fd/WRFPOST.f @@ -127,7 +127,7 @@ PROGRAM WRFPOST mdl2agl_tim, mdl2std_tim, mdl2thandpv_tim, calrad_wcloud_tim,nasa_on,gccpp_on, & fixed_tim, time_output, imin, surfce2_tim, komax, ivegsrc, d3d_on, gocart_on,rdaod, & readxml_tim, spval, fullmodelname, submodelname, hyb_sigp, filenameflat, aqf_on,numx, & - run_ifi_tim, slrutah_on, d2d_chem, gtg_on + run_ifi_tim, slrutah_on, d2d_chem, gtg_on, method_blsn use grib2_module, only: gribit2,num_pset,nrecout,first_grbtbl,grib_info_finalize use upp_ifi_mod, only: write_ifi_debug_files !- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - @@ -153,7 +153,7 @@ PROGRAM WRFPOST ! integer :: kpo,kth,kpv real,dimension(komax) :: po,th,pv - namelist/nampgb/kpo,po,kth,th,kpv,pv,fileNameAER,d3d_on,gocart_on,gccpp_on, nasa_on,gtg_on,popascal & + namelist/nampgb/kpo,po,kth,th,kpv,pv,fileNameAER,d3d_on,gocart_on,gccpp_on, nasa_on,gtg_on,method_blsn,popascal & ,hyb_sigp,rdaod,d2d_chem, aqf_on,slrutah_on, vtimeunits,numx,write_ifi_debug_files integer :: itag_ierr namelist/model_inputs/fileName,IOFORM,grib,DateStr,MODELNAME,SUBMODELNAME & @@ -261,6 +261,7 @@ PROGRAM WRFPOST aqf_on = .false. slrutah_on = .false. gtg_on = .false. + method_blsn = .true. popascal = .false. fileNameAER = '' rdaod = .false. From db2b75cded976e2a32050588b61e50cfd2d45015 Mon Sep 17 00:00:00 2001 From: eric james Date: Wed, 29 Nov 2023 18:32:28 +0000 Subject: [PATCH 4/4] Adding change log entry to WRFPOST.f --- sorc/ncep_post.fd/WRFPOST.f | 1 + 1 file changed, 1 insertion(+) diff --git a/sorc/ncep_post.fd/WRFPOST.f b/sorc/ncep_post.fd/WRFPOST.f index 30ca7af17..01a63baa1 100644 --- a/sorc/ncep_post.fd/WRFPOST.f +++ b/sorc/ncep_post.fd/WRFPOST.f @@ -37,6 +37,7 @@ ! and 2D diag. output (d2d_chem) for GEFS-Aerosols and CCPP-Chem model. !> 2023-05-20 | Rahul Mahajan | Bug fix for fileNameFlat as namelist configurable !> 2023-08-16 | Yali Mao | Add gtg_on logical option +!> 2023-11-29 | Eric James | Add method_blsn logical option !> @author Mike Bladwin NSSL/SPC @date 2002-06-18 !--------------------------------------------------------------------- !> @return wrfpost